home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Actual 85 Febrero 2004.iso / Experto / Apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252752_mod_mem_cache.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-04-15  |  8.0 KB  |  204 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
  3. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  4. <modulesynopsis metafile="mod_mem_cache.xml.meta">
  5.  
  6. <name>mod_mem_cache</name>
  7. <description>Content cache keyed to URIs</description>
  8. <status>Experimental</status>
  9. <sourcefile>mod_mem_cache.c</sourcefile>
  10. <identifier>mem_cache_module</identifier>
  11.  
  12. <summary>
  13.     <note type="warning">
  14.       This module is experimental. Documentation is still under
  15.       development...
  16.     </note>
  17.  
  18.     <p>This module <em>requires</em> the service of <module
  19.     >mod_cache</module>. It acts as a support module for <module
  20.     >mod_cache</module> and provides a memory based storage manager.
  21.     <module>mod_mem_cache</module> can be configured to operate in two
  22.     modes: caching open file descriptors or caching objects in heap storage.
  23.     <module>mod_mem_cache</module> is most useful when used to cache locally
  24.     generated content or to cache backend server content for <module
  25.     >mod_proxy</module> configured for <directive module="mod_proxy"
  26.     >ProxyPass</directive> (aka <dfn>reverse proxy</dfn>).</p>
  27.  
  28.     <p>Content is stored in and retrieved from the cache using URI based
  29.     keys. Content with access protection is not cached.</p>
  30. </summary>
  31. <seealso><module>mod_cache</module></seealso>
  32. <seealso><module>mod_disk_cache</module></seealso>
  33.  
  34. <directivesynopsis>
  35. <name>MCacheSize</name>
  36. <description>The maximum amount of memory used by the cache in
  37. KBytes</description>
  38. <syntax>MCacheSize <var>KBytes</var></syntax>
  39. <default>MCacheSize 100</default>
  40. <contextlist><context>server config</context></contextlist>
  41.  
  42. <usage>
  43.     <p>The <directive>MCacheSize</directive> directive sets the maximum
  44.     amount of memory to be used by the cache, in KBytes (1024-byte units).
  45.     If a new object needs to be inserted in the cache and the size of the
  46.     object is greater than the remaining memory, objects will be removed
  47.     until the new object can be cached. The object to be removed is
  48.     selected using the algorithm specified by <directive
  49.     module="mod_mem_cache">MCacheRemovalAlgorithm</directive>.</p>
  50.  
  51.     <example><title>Example</title>
  52.       MCacheSize 700000
  53.     </example>
  54.  
  55.     <note><title>Note</title>
  56.       <p>The <directive>MCacheSize</directive> value must be greater than
  57.       the value specified by the <directive module="mod_mem_cache"
  58.       >MCacheMaxObjectSize</directive> directive.</p>
  59.     </note>
  60. </usage>
  61. </directivesynopsis>
  62.  
  63. <directivesynopsis>
  64. <name>MCacheMaxObjectCount</name>
  65. <description>The maximum number of objects allowed to be placed in the
  66. cache</description>
  67. <syntax>MCacheMaxObjectCount <var>value</var></syntax>
  68. <default>MCacheMaxObjectCount 1009</default>
  69. <contextlist><context>server config</context></contextlist>
  70.  
  71. <usage>
  72.     <p>The <directive>MCacheMaxObjectCount</directive> directive sets the
  73.     maximum number of objects to be cached. The value is used to create the
  74.     open hash table. If a new object needs to be inserted in the cache and
  75.     the maximum number of objects has been reached, an object will be
  76.     removed to allow the new object to be cached. The object to be removed
  77.     is selected using the algorithm specified by <directive
  78.     module="mod_mem_cache">MCacheRemovalAlgorithm</directive>.</p>
  79.  
  80.     <example><title>Example</title>
  81.       MCacheMaxObjectCount 13001
  82.     </example>
  83. </usage>
  84. </directivesynopsis>
  85.  
  86. <directivesynopsis>
  87. <name>MCacheMinObjectSize</name>
  88. <description>The minimum size (in bytes) of a document to be allowed in the
  89. cache</description>
  90. <syntax>MCacheMinObjectSize <var>bytes</var></syntax>
  91. <default>MCacheMinObjectSize 0</default>
  92. <contextlist><context>server config</context></contextlist>
  93.  
  94. <usage>
  95.     <p>The <directive>MCacheMinObjectSize</directive> directive sets the
  96.     minimum size in bytes of a document for it to be considered
  97.     cacheable.</p>
  98.  
  99.     <example><title>Example</title>
  100.       MCacheMinObjectSize 10000
  101.     </example>
  102. </usage>
  103. </directivesynopsis>
  104.  
  105. <directivesynopsis>
  106. <name>MCacheMaxObjectSize</name>
  107. <description>The maximum size (in bytes) of a document allowed in the
  108. cache</description>
  109. <syntax>MCacheMaxObjectSize <var>bytes</var></syntax>
  110. <default>MCacheMaxObjectSize 10000</default>
  111. <contextlist><context>server config</context></contextlist>
  112.  
  113. <usage>
  114.     <p>The <directive>MCacheMaxObjectSize</directive> directive sets the
  115.     maximum allowable size, in bytes, of a document for it to be considered
  116.     cacheable.</p>
  117.  
  118.     <example><title>Example</title>
  119.       MCacheMaxObjectSize 6400000
  120.     </example>
  121.  
  122.     <note><title>Note</title>
  123.       <p>The value of <directive>MCacheMaxObjectSize</directive> must be
  124.       greater than the value specified by the <directive
  125.       module="mod_mem_cache">MCacheMinObjectSize</directive> directive.</p>
  126.     </note>
  127. </usage>
  128. </directivesynopsis>
  129.  
  130. <directivesynopsis>
  131. <name>MCacheRemovalAlgorithm</name>
  132. <description>The algorithm used to select documents for removal from the
  133. cache</description>
  134. <syntax>MCacheRemovalAlgorithm LRU|GDSF</syntax>
  135. <default>MCacheRemovalAlgorithm GDSF</default>
  136. <contextlist><context>server config</context></contextlist>
  137.  
  138. <usage>
  139.     <p>The <directive>MCacheRemovalAlgorithm</directive> directive specifies
  140.     the algorithm used to select documents for removal from the cache.
  141.     Two choices are available:</p>
  142.  
  143.     <dl>
  144.       <dt><code>LRU</code> (Least Recently Used)</dt>
  145.       <dd><code>LRU</code> removes the documents that have not been accessed
  146.       for the longest time.</dd>
  147.  
  148.       <dt><code>GDSF</code> (GreadyDual-Size)</dt>
  149.       <dd><code>GDSF</code> assigns a priority to cached documents based
  150.       on the cost of a cache miss and the size of the document. Documents
  151.       with the lowest priority are removed first.</dd>
  152.     </dl>
  153.  
  154.     <example><title>Example</title>
  155.       MCacheRemovalAlgorithm GDSF<br />
  156.       MCacheRemovalAlgorithm LRU
  157.     </example>
  158. </usage>
  159. </directivesynopsis>
  160.  
  161. <directivesynopsis>
  162. <name>MCacheMaxStreamingBuffer</name>
  163. <description>Maximum amount of a streamed response to buffer in memory
  164. before declaring the response uncacheable</description>
  165. <syntax>MCacheMaxStreamingBuffer <var>size_in_bytes</var></syntax>
  166. <default>MCacheMaxStreamingBuffer the smaller of 100000 or MCacheMaxObjectSize</default>
  167. <contextlist><context>server config</context>
  168. </contextlist>
  169.  
  170. <usage>
  171.     <p>The <directive>MCacheMaxStreamingBuffer</directive> directive
  172.     specifies the maximum number of bytes of a streamed response to
  173.     buffer before deciding that the response is too big to cache.
  174.     A streamed response is one in which the entire content is not
  175.     immediately available and in which the <code>Content-Length</code>
  176.     may not be known. Sources of streaming responses include proxied
  177.     responses and the output of CGI scripts. By default, a streamed
  178.     response will <em>not</em> be cached unless it has a
  179.     <code>Content-Length</code> header. The reason for this is to
  180.     avoid using a large amount of memory to buffer a partial response
  181.     that might end up being too large to fit in the cache.
  182.     The <directive>MCacheMaxStreamingBuffer</directive> directive allows
  183.     buffering of streamed responses that don't contain a
  184.     <code>Content-Length</code> up to the specified maximum amount of
  185.     space. If the maximum buffer space is reached, the buffered
  186.     content is discarded and the attempt to cache is abandoned.</p>
  187.  
  188.     <note><title>Note:</title>
  189.       <p>Using a nonzero value for <directive>MCacheMaxStreamingBuffer</directive> 
  190.       will not delay the transmission of the response to the client.
  191.       As soon as <module>mod_mem_cache</module> copies a block of streamed
  192.       content into a buffer, it sends the block on to the next output
  193.       filter for delivery to the client.</p>
  194.     </note>
  195.  
  196.     <example>
  197.       # Enable caching of streamed responses up to 64KB:<br />
  198.       MCacheMaxStreamingBuffer 65536
  199.     </example>
  200. </usage>
  201. </directivesynopsis>
  202.  
  203. </modulesynopsis>
  204.